package com.paul.response;

import jdk.internal.dynalink.beans.StaticClass;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by yangjianbo on 2016/3/7.
 */
public class Resp {
    private static final String STATUS="status";     //返回状态码（0正确返回，1异常返回）
    private static final String DATA="data";         //返回携带的数据
    private static final String MSG="msg";           //返回携带的信息

    public static final String SUCESSSTATUS="0";    //成功返回
    public static final String EXCEPTIONSTATUS="1"; //异常返回

    public static Map JsonResp(String status,Object data,String msg){
        HashMap map=new HashMap();
        map.put(STATUS,status);
        map.put(DATA,data);
        map.put(MSG,msg);
        return map;
    }
}
